<%--
  <p>51void.com</p>
  User: cjp
  Date: 2007-5-26
  Time: 17:49:07
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglib.jsp" %>
<html>
<head><title>${actionBean.parentForum.name}</title></head>
<body>

<div class="maintable"><br>

    <div class="subtable" style="">
        <div class="right" style="margin-bottom: 5px;">
            <a href="my.php?item=favorites&amp;fid=2" id="ajax_favorite" onclick="ajaxmenu(event, this.id)">收藏本版</a> |
            <a href="my.php?item=threads&amp;srchfid=2">我的话题</a>
            <a href="rss.php?fid=2&amp;auth=PK1TKjoko8YDi7YELUVzqt1%2Fs3X" target="_blank"><img
                    src="http://images.5d6d.com/orig/common/xml.gif" border="0" class="absmiddle" alt="RSS 订阅全部论坛"/></a>
        </div>
        <div class="nav">
            <f:nav forumId="${param.forumId}"/>
        </div>
    </div>
</div>

<div class="maintable">
    <div class="subtable" style="width: 100%; margin-top: 5px; clear: both;">
        <div class="right">

        </div>
        版主:
        <c:choose>
            <c:when test="${empty actionBean.parentForum.masters}">
                *空缺中*
            </c:when>
            <c:otherwise>
                <c:forTokens items="${actionBean.parentForum.masters}" delims="|" var="master">
                    <c:set var="tempMaster" value="${fn:split(master,':')}"></c:set>
                    <a title="查看版主${tempMaster[1]}的资料" href="dispuser.html?id=${tempMaster[0]}"
                       rel="_blank">${tempMaster[1]}</a>
                </c:forTokens>
            </c:otherwise>
        </c:choose>

    </div>
    <br></div>

<c:if test="${not empty actionBean.subForums}">
    <div class="maintable">
        <div class="spaceborder spacebottom" style="width: 100%">
            <table cellspacing="0" cellpadding="5" width="100%" align="center">
                <tr class="header" align="center">
                    <td width="5%">&nbsp;</td>
                    <td width="54%">论坛</td>
                    <td width="6%">主题</td>
                    <td width="6%">帖数</td>
                    <td width="13%">最后发表</td>
                    <td width="16%">版主</td>
                </tr>
                <c:forEach items="${actionBean.subForums}" var="forum">
                    <c:choose>
                        <c:when test="${empty sessionUser or forum.lastPost.createTime>sessionUser.lastLoginTime}">
                            <c:set var="forumImg" value="${skinPath}/imgs/forum_new.gif"/>
                        </c:when>
                        <c:otherwise>
                            <c:set var="forumImg" value="${skinPath}/imgs/forum.gif"/>
                        </c:otherwise>
                    </c:choose>
                    <tr class="row" onMouseOver="this.style.backgroundColor='#F3FDF2'"
                        onMouseOut="this.style.backgroundColor='#FFF'">
                        <td align="center"><img src="${forumImg}"
                                                alt=""/></td>
                        <td class="subject">
                            <a href="${ctx}/forum.do?forumId=${forum.id}"><span class="bold">${forum.name}</span>
                                (今日：${i:isToday(forum.lastPost.createTime)?forum.postCountToday:'0'})
                            </a>
                            <br><span class="smalltxt"></span></td>
                        <td align="center">${forum.topicCount}</td>
                        <td align="center">${forum.postCount}</td>
                        <td align="center"><span class="smalltxt"><c:choose>
                            <c:when test="${empty forum.lastPost}">
                                无发贴人
                            </c:when>
                            <c:otherwise>
<span class="smalltxt"><a href="redirect.php?tid=640513&amp;goto=lastpost#lastpost">

        ${i:cnDate(forum.lastPost.createTime)}</a></span><br>by
                                <a href="space-username-pc77maikongjian.html">${empty forum.lastPost.authorName?'匿名':forum.lastPost.authorName}</a>
                            </c:otherwise>
                        </c:choose></span></td>
                        <td align="center" style="word-break: keep-all">
                            <c:choose>
                                <c:when test="${empty forum.masters}">
                                    暂无版主
                                </c:when>
                                <c:otherwise>
                                    <c:forTokens items="${forum.mastersNickname}" delims="|" var="master">
                                        <c:set var="tempMaster" value="${fn:split(master,',')}"></c:set>
                                        <a title="查看版主${tempMaster[1]}的资料" href="dispuser.html?id=${tempMaster[0]}"
                                           rel="_blank">${tempMaster[1]}</a>
                                    </c:forTokens>
                                </c:otherwise>
                            </c:choose>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
        <br></div>
</c:if>

<div class="maintable" style="clear:both">
    <table width="100%" cellspacing="0" cellpadding="0" align="center" style="margin-bottom: 5px">
        <tr>
            <td valign="bottom">

                <i:page curPage="${actionBean.topics.pageNumber}" totalCount="${actionBean.topics.totalElements}"
                        viewCount="${actionBean.topics.pageSize}"></i:page>

            </td>
            <td align="right" valign="bottom">
                <div id="newspecialheader" class="right"><a
                        href="${ctx}/post.do?newThreadForm&forumId=${param.forumId}"
                        ><img src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/newtopic.gif" border="0" alt=""/></a>
                </div>

            </td>
        </tr>
    </table>
</div>


<div class="maintable">
    <div class="spaceborder" style="width: 100%; border-bottom: none">
        <table cellspacing="0" cellpadding="5" width="100%">
            <tr class="header">
                <td colspan="6">
                    <table width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><a href="${ctx}/forum.do?forumId=${param.forumId}"
                                   class="bold">${actionBean.parentForum.name}</a></td>
                            <td
                                    align="right">
                                <a href="${ctx}/forum.do?forumId=${param.forumId}">全部</a>
                                <a href="${ctx}/forum.do?forumId=${param.forumId}&digest">精华</a>
                                <!--<a href="forumdisplay.php?fid=2&amp;filter=poll">投票</a>-->
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr class="category">
                <td width="4%">&nbsp;</td>
                <td width="25">&nbsp;</td>
                <td width="55%" align="left">标题</td>
                <td width="12%" align="center">作者</td>
                <td width="8%" align="center">回复/查看</td>
                <td width="17%" align="center">最后发表</td>
            </tr>
        </table>
    </div>
</div>

<c:choose>
<c:when test="${empty actionBean.topics.elements}">
    <input type="hidden" name="formhash" value="00756f41">

    <div class="maintable">
        <div class="spaceborder" style="width: 100%; border-top: none; border-bottom: none">
            <table cellspacing="0" cellpadding="5" width="100%" align="center"
                   style="margin-top:-1px;border-top:none">
                <tr>
                    <td colspan="7" class="altbg1">本论坛或指定的范围内尚无主题。</td>
                </tr>
            </table>
        </div>
    </div>
    <div class="maintable">
        <div class="spaceborder spacebottom" style="width: 100%; border-top: none; margin-bottom: 5px; height:0px; font-size:0px; line-height:
0px;"></div>
    </div>
</c:when>
<c:otherwise>
    <form method="post" name="moderate" action="${ctx}/masterManage.do">
        <div class="maintable">
            <div class="spaceborder" style="width: 100%; border-top: none;border-bottom: none">
                <c:forEach items="${actionBean.topics.elements}" var="topic">

                    <c:choose>
                        <c:when test="${empty sessionUser or topic.lastPost.createTime>sessionUser.lastLoginTime}">
                            <c:set var="topicImg" value="${skinPath}/imgs/folder_new.gif"/>
                        </c:when>
                        <c:otherwise>
                            <c:set var="topicImg" value="${skinPath}/imgs/folder_common.gif"/>
                        </c:otherwise>
                    </c:choose>
                    <table cellspacing="0" cellpadding="5" class="row"
                           onMouseOver="this.style.backgroundColor='#F3FDF2'"
                           onMouseOut="this.style.backgroundColor='#FFF'">
                        <tr>
                            <td class="f_folder"><a href="${ctx}/thread.do?tid=${topic.id}" target="_blank"><img
                                    src="${topicImg}" border="0"
                                    alt=""/></a></td>
                            <td class="f_icon">&nbsp;</td>
                            <td class="f_title">
                                <div class="right">
                                </div>
                                <f:secureMaster>
                                    <input class="checkbox" type="checkbox" name="topicId" value="${topic.id}">
                                </f:secureMaster>
                                <a href="${ctx}/thread.do?tid=${topic.id}">${topic.title}</a>

                                <label style="float:right">
                                    <c:if test="${topic.toped}"><img src="${skinPath}/imgs/top.gif"
                                                                     alt="置顶"/></c:if>

                                    <c:if test="${topic.status==1}"><img src="${skinPath}/imgs/digest.gif"
                                                                         alt="精华"/></c:if>
                                    &nbsp;</label>
                            </td>
                            <td class="f_author">
                                <a href="profile-uid-1.html">${empty topic.authorName?'匿名':topic.authorName}</a>
                                <br><span class="smalltxt lighttxt">${i:cnDate(topic.createTime)}</span></td>
                            <td class="f_views">${topic.postCount} / <span
                                    class="lighttxt">${topic.viewCount}</span></td>
                            <td class="f_last">
                                    <span class="smalltxt"><a
                                            href="redirect.php?tid=3&amp;goto=lastpost#lastpost">${i:cnTime(topic.lastPost.createTime)}</a></span>
                                <br>by
                                <a href="profile-username-cjp472.html">${empty topic.lastPost.authorName?'匿名':topic.lastPost.authorName}</a>
                            </td>
                        </tr>
                    </table>
                </c:forEach>
            </div>
        </div>

        <f:secureMaster>
            <div class="maintable">
                <div class="spaceborder spacebottom" style="width: 100%; border-top: none; margin-bottom: 5px;">
                    <table cellspacing="0" cellpadding="5" width="100%" align="center">
                        <tr class="category">
                            <td width="4%"></td>
                            <td>批量管理选项</td>
                        </tr>
                        <tr>
                            <td class="altbg1" colspan="2"><input type="hidden" name="operation">
                                <input class="checkbox" type="checkbox" name="chkall"
                                       onclick="checkall(this.form, 'topicId')">全选
                                <input type="submit" class="lightbutton" name="delete" value="删除主题">
                                <input type="submit" class="lightbutton" name="move" value="移动主题">
                                <input type="submit" class="lightbutton" name="type" value="主题分类">
                                <input type="submit" class="lightbutton" name="close" value="关闭/打开主题">
                                <input type="submit" class="lightbutton" name="stick" value="置顶/解除置顶">
                                <input type="submit" class="lightbutton" name="digest" value="加入/解除精华">
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </f:secureMaster>

        <input type="hidden" name="fid" value="${param.forumId}"/>
    </form>
</c:otherwise>
</c:choose>

<div class="maintable" style="clear:both">
    <table width="100%" cellspacing="0" cellpadding="0" align="center" style="margin-bottom: 5px">
        <tr>
            <td valign="bottom">
                <i:page curPage="${actionBean.topics.pageNumber}" totalCount="${actionBean.topics.totalElements}"
                        viewCount="${actionBean.topics.pageSize}"></i:page>
            </td>
            <td align="right" valign="bottom">
                <div class="right"><a
                        href="${ctx}/post.do?newThreadForm&forumId=${param.forumId}"
                        ><img src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/newtopic.gif" border="0" class=""
                              alt=""/></a></div>
            </td>
        </tr>
    </table>
</div>


<div class="maintable">
    <s:form method="get" action="/forum.do">
        <input type="hidden" name="searchBean.forumIds" value="${param.forumId}">
        <input type="hidden" name="forumId" value="${param.forumId}">
        <input type="hidden" name="search" value="">

        <div class="subtable option">
            <div style="margin: 6px">
                <div class="right smalltxt">
                    查看 <s:select name="searchBean.beforeTimes">
                    <s:option value="0" selected="true">全部主题</s:option>
                    <s:option value="86400">1 天以来主题</s:option>
                    <s:option value="172800">2 天以来主题</s:option>
                    <s:option value="604800">1 周以来主题</s:option>
                    <s:option value="2592000">1 个月以来主题</s:option>
                    <s:option value="7948800">3 个月以来主题</s:option>
                    <s:option value="15897600">6 个月以来主题</s:option>
                    <s:option value="31536000">1 年以来主题</s:option>
                </s:select>&nbsp;
                    排序方式&nbsp;
                    <s:select name="searchBean.orderby">
                        <s:option value="lastpost" selected="selected">回复时间</s:option>
                        <s:option value="dateline">发布时间</s:option>
                        <s:option value="replies">回复数量</s:option>
                        <s:option value="views">浏览次数</s:option>
                    </s:select>&nbsp;
                    <s:select name="searchBean.ascdesc">
                        <s:option value="asc">按升序排列</s:option>
                        <s:option value="desc" selected="selected">按降序排列</s:option>
                    </s:select>&nbsp;
                    <input class="button" type="submit" name="submit2" value="提 &nbsp; 交">
                </div>
<span class="smalltxt">

    <select onchange="gotoForum(this)">
        <option value="">论坛跳转 ...</option>
        <f:listnav></f:listnav>
    </select>
            </span>
            </div>
        </div>
    </s:form>
</div>
<br><br>

<div class="tableborder" style="width: 400px; padding: 9px; background-color: #F6FBFF"><span class="smalltxt">
<img src="${skinPath}/imgs/folder_new.gif" class="absmiddle" alt=""/>&nbsp; 有新回复&nbsp; &nbsp; &nbsp; &nbsp;
<img src="${skinPath}/imgs/folder_common.gif" class="absmiddle" alt=""/>&nbsp; 无新回复&nbsp; &nbsp; &nbsp; &nbsp;
<img src="${skinPath}/imgs/folder_hot.gif" class="absmiddle" alt=""/>&nbsp; 热门主题&nbsp; &nbsp; &nbsp; &nbsp;
<img src="${skinPath}/imgs/folder_lock.gif" class="absmiddle" alt=""/>&nbsp; 关闭主题
</span></div>
<script type="text/javascript">
    function gotoForum(sel) {
        if (sel.options[sel.selectedIndex].value != '')
            window.location = ('${ctx}/forum.do?forumId=' + sel.options[sel.selectedIndex].value)
    }
</script>
<!-- end #forum list -->
</body>
</html>